/**
 * Module dependencies
 */
var actionUtil = require('../util/actionUtil'),
  _ = require('lodash');

module.exports = function findRecords(req, res) {

  // Look up the model
  var Model = actionUtil.parseModel(req);

  var id = req.param('id');
  Model.update({id: id}, {isUsing: false}).exec(function(err, updated) {
    if(err) {
      return res.json({
        code: 500
      });
    }
    return res.json({
      code: 200
    });
  });
};
